SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].OriginalesDeleteCommand
(
	@Original_ID numeric(10, 0),
	@Original_NRO_ORIGINAL varchar(25),
	@Original_ID_DESCRIPCION numeric(10, 0),
	@Original_ID_CATEGORIA numeric(10, 0),
	@IsNull_FECHA_CREACION Int,
	@Original_FECHA_CREACION datetime2,
	@IsNull_COMENTARIO Int,
	@Original_COMENTARIO varchar(150)
)
AS
	SET NOCOUNT OFF;
DELETE FROM [ORIGINALES] WHERE (([ID] = @Original_ID) AND ([NRO_ORIGINAL] = @Original_NRO_ORIGINAL) AND ([ID_DESCRIPCION] = @Original_ID_DESCRIPCION) AND ([ID_CATEGORIA] = @Original_ID_CATEGORIA) AND ((@IsNull_FECHA_CREACION = 1 AND [FECHA_CREACION] IS NULL) OR ([FECHA_CREACION] = @Original_FECHA_CREACION)) AND ((@IsNull_COMENTARIO = 1 AND [COMENTARIO] IS NULL) OR ([COMENTARIO] = @Original_COMENTARIO)))
GO
